<?php
// {{{ includes
load_class('Controller_BoBase');
load_class('GD_FCKeditor');
// }}}

/**
 * 定义Controller_MBoConfig
 *
 * @author jack
 * @todo 用户后台管理 
 */


class Controller_MBoConfig extends Controller_BoBase {
	
	var $_modelConfig;
	
	function Controller_MBoConfig(){
		parent::Controller_BoBase();
		$this->_modelConfig=get_singleton('Model_Config');
	}
	
	
	function actionIndex(){
		
		$conditions='';
		$page=(int)$_GET['page'];
		$pageSize=10;
		$sort='config_id';
		
		$list = $this->_modelConfig->getList($conditions,$page,$pageSize,$sort);
		 
		include(BACKEND_TPL_DIR.'/config/index.tpl.php');
	}
	
	
	function actionADD(){
		$this->_Config();
	}
	
	function actionEdit(){
		
	}
	function actionSave(){
		
	}
	
	function _Config($rowset='',$error=''){
		
		$action=url($this->_controllerName,'Save');
		$token=$this->getToken();
		include(BACKEND_TPL_DIR.'/system/index.tpl.php');
	}
	
	function actionRemove(){
		
	}
	
	function actionRemoveSelected(){
		if($_POST['config_id']){
			foreach ($_POST['config_id'] as $id){
				$this->_Remove($id);
			}
		}
		
		$url=url($this->_controllerName,'');
		redirect($url);
	}
	
	function _Remove($id){
		
	}
	 
}



